package apt.action;

import java.util.List;

import apt.bean.SongBean;
import apt.dao.SongDao;

import com.opensymphony.xwork2.ActionSupport;

public class SongAction extends ActionSupport{

	private static final long serialVersionUID = 1L;
	private SongBean songBean;
	private List<SongBean> listSongBeans;
	private SongDao songDao;
	
	public SongAction() {
		songDao = new SongDao();
	}
	
	public String initData()
	{
		return SUCCESS;
	}
	
	public String fillDataSong()
	{
		
		return SUCCESS;
	}
	
	public String showListSongs()
	{
		try {
			listSongBeans = songDao.getlistSong();
		} catch (Exception e) {
			return ERROR;
		}
		return SUCCESS;
	}

	public SongBean getSongBean() {
		return songBean;
	}

	public void setSongBean(SongBean songBean) {
		this.songBean = songBean;
	}

	public List<SongBean> getListSongBeans() {
		return listSongBeans;
	}

	public void setListSongBeans(List<SongBean> listSongBeans) {
		this.listSongBeans = listSongBeans;
	}

	public SongDao getSongDao() {
		return songDao;
	}

	public void setSongDao(SongDao songDao) {
		this.songDao = songDao;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	

}
